#pragma once
class CEntity;
#include <vector>
using namespace std;
class CSGD_TextureManager;
class CObjectManager;
class CElemental;
class CPlayer;
class CWaypoint;
class CGameplayState;
class CObjectFactory
{
public:
	static CObjectFactory* GetInstance( void );
	// index = vector index
	void CreateEntity( int nIndex, int nX, int nY, int nOwner, int lane );
	//This will setup all Entities in the game (later will load through XML)
	void Init( void );
	void ShutDown(void);
	void SpawnElemental( CPlayer* owner, short laneChoice );
	void SpawnTower( short towerType, float nX, float nY, int team );
	void SpawnNode( float nX, float nY, short nTemp );
	void SpawnAvatar( float nX, float nY, int team );
	void SpawnAvatar( CPlayer* owner, float nX, float nY );
private:
	CObjectFactory(void);
	~CObjectFactory(void);
	CObjectFactory( const CObjectFactory&);
	CObjectFactory& operator=( const CObjectFactory& );

	enum { Fire = 0, Air, Water, Earth, Magma, Kamikaze, Mud, Sand, Storm = 8, 
			Steam = 9, Metal, Mortar, Hurricane, Everest, Omega = 14, Tower=15, Avatar=16 };
	vector<CEntity*> AllGameObjects;
	vector<CWaypoint*> Waypoints;
	CSGD_TextureManager*	m_pTM;
	CObjectManager*			m_pOM;
	CGameplayState*			m_pGS;


	typedef vector<CEntity*>::iterator OListIterator;


	int tempFireImg;
	int tempAirImg;
	int tempWaterImg;
	int tempEarthImg;
	int tempMagmaImg;
	int tempKamikazeImg;
	int tempMudImg;
	int tempSandImg;
	int tempStormImg;
	int tempSteamImg;
	int tempMetalImg;
	int tempMortarImg;
	int tempHurricaneImg;
	int tempEverestImg;
	int tempOmegaImg;



	int tempTowerImg;
	int tempAvatarImg;
};

